
package com.showcai.controller.systemSet;

import com.showcai.controller.base.BaseController;
import com.showcai.module.FeedBack;
import com.showcai.result.ResultObj;
import com.showcai.result.ReturnCode;
import com.showcai.service.FeedBackService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created by liuheng on 2018/9/22.
 */
@RequestMapping("/systemSet")
@Controller
public class SystemSetController extends BaseController {
 @Autowired
 FeedBackService feedBackService;

    /**
     * 意见反馈
     * @return
     */
    @RequestMapping(value = "/feedback/add", method = RequestMethod.POST)
    @ResponseBody
    public String feedback(FeedBack feedBack) {
        logger.info("feedback==================================>>>>>>");
        ResultObj resultObj = new ResultObj();
        feedBackService.insertFeedBack(feedBack);
        resultObj.setCode(ReturnCode.SUCCESS.getCode());
        resultObj.setMsg(ReturnCode.SUCCESS.getMsg());
        return resultObj.toJson();
    }


}
